package com.sita.tingterest.utils;

import android.content.Context;
import android.view.View;
import android.view.inputmethod.InputMethodManager;

import com.sita.bike.support.GlobalContext;


/**
 * liteplayer by loader
 *
 * @author qibin
 */
public class MobileUtils {
    /**
     * 隐藏输入法软键盘
     *
     * @param view attachview
     */
    public static void hideInputMethod(View view) {
        InputMethodManager imm = (InputMethodManager) GlobalContext.getGlobalContext()
                .getSystemService(Context.INPUT_METHOD_SERVICE);
        if (imm.isActive()) {
            imm.hideSoftInputFromWindow(view.getWindowToken(), InputMethodManager.HIDE_NOT_ALWAYS);
        }
    }
}
